<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProjectTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('projects', function (Blueprint $table) {//创建借款表projects表
            //更改字段pid主键
            $table->increments('pid');
            //用户uid
            $table->integer('uid');
            //用户名
            $table->string('name');
            //贷款金额
            $table->integer('money');
            //手机号
            $table->string('mobile',11);
            //项目名称
            $table->string('title');
            //年利率(百分比)
            $table->tinyinteger('rate');
            //还款期限,月为单位
            $table->tinyinteger('hrange');
            //审核状态 -1不通过, 0审核中, 1招标中, 2还款中, 3结束
            $table->tinyinteger('status');
            //已招标金额
            $table->integer('recive');
            //项目发布时间
            $table->integer('pubtime');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('projects');
    }
}
